package com.example.demo.filter;

import org.springframework.http.MediaType;

import javax.servlet.*;
import javax.servlet.http.HttpServletRequest;
import java.io.IOException;

public class FilterTest implements Filter
{
    public FilterTest(){
        System.out.println("Constructor: FilterTest");
    }
    @Override
    public void init(FilterConfig filterConfig) throws ServletException
    {
        System.out.println("FilterTest init");
    }

    @Override
    public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
            throws IOException, ServletException
    {
        System.out.println("FilterTest doFilter");
        chain.doFilter(request, response);
    }

    @Override
    public void destroy()
    {
        System.out.println("FilterTest destroy");
    }
}

